home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d886.lha / PatchLibrary / Includes / patch.h < prev    next >
C/C++ Source or Header  |  1993-07-16  |  2KB  |  48 lines

  1. #ifndef LIBRARIES_PATCH_H
  2. #define LIBRARIES_PATCH_H
  3. /*****************************************************************************/
  4. /*
  5. **    $Filename: libraries/patch.h $
  6. **    $Release: 1.0 Includes $
  7. **    $Date: 93/03/23 $
  8. **
  9. **    definition of patch.library public structures and returncodes
  10. **
  11. **    (C) Copyright 1993 Stefan Fuchs
  12. **    All Rights Reserved
  13. */
  14. /*****************************************************************************/
  15.  
  16. #ifndef    EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19.  
  20.  
  21. #define    PatchName "patch.library"
  22.  
  23. /* Structure required to install new patches via patch.library/InstallPatch() */
  24. struct NewPatch
  25. {
  26.     APTR    NPAT_NewCode;        /* pointer to the patch code to be installed */
  27.     ULONG    NPAT_NewCodeSize;    /* optional length of NPAT_NewCode in bytes  */
  28.     APTR    NPAT_LibraryName;    /* pointer to the LibraryName                */
  29.     UWORD    NPAT_LibVersion;    /* version of Library to open                */
  30.     WORD    NPAT_LVO;        /* LVO of function to patch                  */
  31.     WORD    NPAT_Priority;        /* Priority (-127...+126) of the patch       */
  32.     UWORD    NPAT_Flags;        /* currently none defined (keep zero)        */
  33.     APTR    NPAT_PatchName;        /* optional pointer to an IDString           */
  34.     APTR    NPAT_Result2;        /* optional pointer to longword for Result2  */
  35. };
  36.  
  37.  
  38. /* ErrorCodes */
  39. #define PATERR_Ok        0    /* Everything Ok                    */
  40. #define PATERR_PatchInUse    1    /* Patch Usecount <> 0              */
  41. #define PATERR_OutOfMem        3    /* Out of memory                    */
  42. #define PATERR_OpenLib        4    /* Failed to open requested library */
  43. #define PATERR_FuncNotStd    5    /* Function to patch is not in the standard format */
  44. #define PATERR_PatchInstalled    6    /* Can't remove patch because another program has  */
  45.                     /* installed a non-patch.library patch later       */
  46.  
  47. #endif    /* LIBRARIES_PATCH_H */
  48.